function save() {
    //trim去掉字符串两边的空格
    if (checkName()) {
        let data = {
            name: $.trim($("#name").val()),
            isShow: $("input[name='isShow']:checked").val()
        }
        let result = myAjax("/back/cuisine/add", data, "post");
        if (result.count == 1) {
            $('#right').load('/back/cuisine/cuisineFindAll.html')
        } else {
            alert("添加失败");
        }
    }

}

function checkName() {
    let name = $.trim($("#name").val());
    let reg = /[\u4e00-\u9fa5]{2,4}/;
    if (reg.test(name)) {
        return true
    }
    return false;
}